<template>
  <div class="table-container">
      <el-table
        :key="tablekey"
        v-loading="listLoading"
        :data="list"
        border
        fit
        highlight-current-row
        style="width:100%"
        @sort-change="sortChange"
      >
        <el-table-column label="序号" prop="id"
          sortable="custom"
          align="center"
          width="center"
        >
          <template slot-scope="{row}">
            <span>{{ row.id }}</span>
          </template>
        </el-table-column>    
        <el-table-column label="标题" min-width="150px">
          <template slot-scope="{row}">
             <span class="link-type" @click="handleUpdate(row)">{{ row.title }}</span>
          </template> 
        </el-table-column>  
        <el-table-column label="类型" width="110px" align="center">
          <template slot-scope="{row}">
            <span>{{ row.type }}</span>
          </template>
        </el-table-column>
        <el-table-column label="创建时间" width="150px" align="center">
          <template slot-scope="{row}">
            <span>{{ row.type }}</span>
          </template>
        </el-table-column>
        <el-table-column label="修改时间" width="150px" align="center">
          <template slot-scope="{row}">
            <span>{{ row.type }}</span>
          </template>
        </el-table-column>
      </el-table>
  </div>
</template>

<script>
export default {
    name:'Table',
    data(){
        return{
            tablekey:0,
            listLoading:true
        }
    }
}
</script>

<style>
.table-container{
    padding: 10px 20px 20px 20px;
}
</style>